class ClickableImage:
    def __init__(self, screen, image, position):
        self.screen = screen
        self.image = image
        self.rect = self.image.get_rect()
        self.rect.topleft = position
        self.clicked = False

    def update(self, mouse_pos):
        if self.rect.collidepoint(mouse_pos):
            self.clicked = True
        else:
            self.clicked = False

    def draw(self):
        self.screen.blit(self.image, self.rect.topleft)

    def is_clicked(self):
        return self.clicked
